From a7ca5c402e8cf61c5e8dd6e6797a627863f5a243 Mon Sep 17 00:00:00 2001 From: Mukesh Rathor Date: Mon, 24 Mar 2014 09:47:59 +0100 Subject: [PATCH] x86/pvh: disallow PHYSDEVOP_pirq_eoi_gmfn_v2/v1 A call to do_physdev_op with PHYSDEVOP_pirq_eoi_gmfn_v2/v1 will corrupt struct hvm_domain when it writes to domain->arch.pv_domain.pirq_eoi_map. Disallow that. Currently, such a path exists for linux dom0 pvh. Signed-off-by: Mukesh Rathor --- xen/arch/x86/hvm/hvm.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 9dd56f7fc8..08ab9cba37 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -3427,6 +3427,12 @@ static long hvm_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) case PHYSDEVOP_irq_status_query: case PHYSDEVOP_get_free_pirq: return do_physdev_op(cmd, arg); + + /* pvh fixme: coming soon */ + case PHYSDEVOP_pirq_eoi_gmfn_v1: + case PHYSDEVOP_pirq_eoi_gmfn_v2: + return -ENOSYS; + } } -- 2.30.2